﻿@model IEnumerable<BLL.SanPham>
@{
    ViewBag.Title = "Quản Lý Nợ Công";
}

<div class="conten_title">
    <div class="row">
        <div class="col-md-4">
            <div class="col-md-2">
                <img src="~/Images/icon-48-module.png" />
            </div>
            <div class="col-md-10">
                <h4>Quản lý sản phẩm</h4>
            </div>

        </div>
        <div class="col-md-7">

            <div class="col-md-4">

            </div>
            <!-- end --->
            <div class="col-md-8 conten_title_right ">

                <a href="#">
                    <img style="width:32px;" src="" />

                    <br />
                    back
                </a>
                <a href="#">
                    <span class="icon-32-trash"></span>
                    Delete
                </a>
                <a href="/QLCongNo/Add">
                    <span class="icon-32-new"></span>
                    new
                </a>


            </div>
        </div>
    </div>
</div>
<!-- End conten_title-->
<div class="content_table">
    <table cellpadding="1" cellspacing="1" border="1" class="table table-hover">
        <tr class="table_title">
           
            <th class="form-inline" style="width:60px; ">
                <input id="ChkCheckFull" name="delall" type="checkbox" value="" />
                <button type="submit" class="glyphicon glyphicon-trash btn-sm" value="" onclick="return DeleteContributionRateSelected()" style="color:red; border:none; background:none"></button>
            </th>
            
            <th class="text-center">Tên sản phẩm</th>
            <th class="text-center">Giá sản phẩm</th>
            <th class="text-center">Đơn vị tính</th>
            <th class="text-center">Nhà sản xuất</th>
            <th class="text-center">Ngày sản xuất</th>
            <th class="text-center">Ngày hết hạn</th>
           
            <th class="text-center">Delete | Edit</th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td> <input type="checkbox" class="checkCust" name="MaSP" id="@item.MaSP" value='@item.MaSP' /> </td>
                <td class="text-center">
                    @Html.DisplayFor(modelItem => item.TenSP)
                </td>
                <td class="text-center">
                    @Html.DisplayFor(modelItem => item.GiaSP)
                </td>
                <td class="text-center">
                    @Html.DisplayFor(modelItem => item.DonViTinh)
                </td>
                <td class="text-center">
                    @Html.DisplayFor(modelItem => item.NhaSX)
                </td>
                <td class="text-center"> 
                    @Html.DisplayFor(modelItem => item.NgaySX)
                </td>
                <td class="text-center">
                    @Html.DisplayFor(modelItem => item.NgayHetHan)
                </td>
                
                <td class="text-center">
                    <a href="#">
                        <img src="~/Images/delete.png" style="width: 20px; height: 20px" />
                    </a>
                    
                    <a href="~/SanPham/Edit/@item.MaSP">
                        <img src="~/Images/edit.png" style="width: 20px; height: 20px" />
                    </a>
                </td>
            </tr>
        }

    </table>
  
</div>

<script>
    $("#ChkCheckFull").click(function () {
        if ($("#ChkCheckFull").is(':checked') == true) {
            $(".checkCust").prop('checked', true);
        }
        else {
            $(".checkCust").prop('checked', false);
        }
    });
</script>